:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --accent-color: #28a745;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #f8f9fa;
    --white: #ffffff;
    --border-color: #e9ecef;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-hover: 0 5px 20px rgba(0,0,0,0.15);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --card-bg: #ffffff;
    --header-bg: #ffffff;
    --footer-bg: #343a40;
}

[data-theme="dark"] {
    --primary-color: #4dabf7;
    --secondary-color: #868e96;
    --accent-color: #51cf66;
    --text-color: #e9ecef;
    --text-light: #adb5bd;
    --bg-color: #121212;
    --white: #1e1e1e;
    --border-color: #495057;
    --shadow: 0 2px 10px rgba(0,0,0,0.3);
    --shadow-hover: 0 5px 20px rgba(0,0,0,0.5);
    --gradient-primary: linear-gradient(135deg, #495057 0%, #6c757d 100%);
    --gradient-secondary: linear-gradient(135deg, #868e96 0%, #adb5bd 100%);
    --card-bg: #1e1e1e;
    --header-bg: #1e1e1e;
    --footer-bg: #212529;
}

/* 基本重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
header {
    background-color: var(--header-bg);
    box-shadow: var(--shadow);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo h1 {
    color: #2c3e50;
    font-size: 1.8rem;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: var(--primary-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.language-switcher {
    display: flex;
    gap: 0.5rem;
}

.lang-btn {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    color: #495057;
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.lang-btn.active {
    background: #3498db;
    border-color: #3498db;
    color: white;
}

.lang-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.lang-btn.active:hover {
    background: #0056b3;
    border-color: #0056b3;
}

/* 主题切换器样式 */
.theme-switcher {
    display: flex;
    align-items: center;
}

.theme-toggle {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-color);
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.theme-toggle:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: rotate(180deg);
}

[data-theme="dark"] .theme-toggle {
    color: #ffd43b;
}

[data-theme="dark"] .theme-toggle:hover {
    color: white;
}

/* 深色模式下的卡片悬停效果 */
[data-theme="dark"] .project-card:hover {
    box-shadow: 0 10px 30px rgba(77, 171, 247, 0.2);
}

[data-theme="dark"] .achievement-card:hover {
    box-shadow: 0 10px 30px rgba(81, 207, 102, 0.2);
}

/* 深色模式下的按钮效果 */
[data-theme="dark"] .btn.primary {
    box-shadow: 0 4px 15px rgba(77, 171, 247, 0.3);
}

[data-theme="dark"] .btn.primary:hover {
    box-shadow: 0 6px 20px rgba(77, 171, 247, 0.4);
}

/* 深色模式下的输入框焦点效果 */
[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group textarea:focus {
    box-shadow: 0 0 0 3px rgba(77, 171, 247, 0.2);
}

/* 深色模式下的时间线样式 */
[data-theme="dark"] .timeline-item {
    border-left-color: var(--border-color);
}

[data-theme="dark"] .timeline-year {
    background: var(--primary-color);
    color: white;
}

/* 深色模式下的社交媒体链接 */
[data-theme="dark"] .social-links a {
    background: var(--card-bg);
    border-color: var(--border-color);
}

[data-theme="dark"] .social-links a:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* 深色模式下的菜单背景 */
[data-theme="dark"] nav.active {
    background: var(--card-bg);
}

/* 深色模式下的技能进度条背景 */
[data-theme="dark"] .skill-progress {
    background: rgba(255, 255, 255, 0.1);
}

.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
}

/* 主要内容样式 */
main {
    margin-top: 80px;
}

/* 首页部分样式 */
.hero {
    background: linear-gradient(135deg, #3498db, #8e44ad);
    color: #fff;
    padding: 100px 0;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hero-text {
    flex: 1;
    padding-right: 50px;
}

.hero-text h2 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero-text .tagline {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #ecf0f1;
}

.hero-text p {
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.highlight {
    color: #f1c40f;
}

.cta-buttons {
    display: flex;
    gap: 20px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn.primary {
    background: var(--gradient-primary);
    color: white;
    border: none;
}

.btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn.secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn.secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.profile-frame {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    border: 5px solid #f1c40f;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    position: relative;
}

.profile-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.profile-frame:hover img {
    transform: scale(1.05);
}

/* 通用部分样式 */
.section {
    padding: 80px 0;
    background: var(--white);
}

.section:nth-child(even) {
    background: var(--bg-color);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    color: #2c3e50;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: #3498db;
    margin: 15px auto;
    border-radius: 2px;
}

/* 关于我部分样式 */
.about-intro {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 50px;
    align-items: start;
    margin-bottom: 60px;
}

.about-photo {
    display: flex;
    justify-content: center;
}

.profile-frame-large {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    border: 5px solid #f1c40f;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    position: relative;
    background: linear-gradient(135deg, #3498db, #8e44ad);
}

.profile-frame-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.profile-frame-large:hover img {
    transform: scale(1.05);
}

.about-summary h3 {
    font-size: 2rem;
    margin-bottom: 25px;
    color: #2c3e50;
    font-weight: 600;
}

.about-description {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 20px;
    color: #34495e;
}

.about-interests {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 30px;
    color: #7f8c8d;
    font-style: italic;
}

.about-contact-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.about-contact-info span {
    display: flex;
    align-items: center;
    font-size: 1rem;
    color: #2c3e50;
}

.about-contact-info span i {
    margin-right: 10px;
    color: #3498db;
    width: 20px;
}

.about-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.timeline-section h3,
.achievements-section h3 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: #2c3e50;
    text-align: center;
    position: relative;
}

.timeline-section h3::after,
.achievements-section h3::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: #3498db;
    margin: 10px auto 0;
    border-radius: 2px;
}

/* 时间线样式 */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #3498db;
}

.timeline-item {
    position: relative;
    margin-bottom: 35px;
    padding-left: 20px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -36px;
    top: 8px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #3498db;
    border: 3px solid #fff;
    box-shadow: 0 0 0 3px #3498db;
}

.timeline-year {
    font-weight: 600;
    color: #3498db;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.timeline-content h4 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 600;
}

.timeline-content p {
    color: #7f8c8d;
    margin-bottom: 0;
    font-size: 1rem;
    line-height: 1.6;
}

/* 成就部分样式 */
.achievements-grid {
    display: grid;
    gap: 20px;
}

.achievement-card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

.achievement-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #f1c40f, #f39c12);
}

.achievement-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.achievement-card i {
    font-size: 2.5rem;
    color: #f1c40f;
    margin-bottom: 15px;
}

.achievement-card h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #2c3e50;
    font-weight: 600;
}

.achievement-card p {
    color: #7f8c8d;
    font-size: 0.95rem;
    margin-bottom: 0;
    line-height: 1.5;
}

/* 技能部分样式 */
.skills-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 50px;
}

.skill-category h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #2c3e50;
}

.skill-bar {
    margin-bottom: 25px;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.skill-progress {
    height: 10px;
    background-color: #ecf0f1;
    border-radius: 5px;
    overflow: hidden;
}

.skill-progress-bar {
    height: 8px;
    background: var(--gradient-primary);
    border-radius: 4px;
    transition: width 0.8s ease;
}

/* 项目部分样式 */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.project-card {
    background: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.project-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-placeholder {
    width: 100%;
    height: 100%;
    background-color: #ecf0f1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7f8c8d;
    font-size: 4rem;
}

.project-content {
    padding: 20px;
}

.project-content h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

.project-content p {
    margin-bottom: 15px;
    color: #7f8c8d;
}

.project-tags {
    margin-bottom: 20px;
}

.tag {
    display: inline-block;
    background-color: #3498db;
    color: #fff;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-right: 5px;
    margin-bottom: 5px;
}

.project-links {
    display: flex;
    gap: 10px;
}

.btn.small {
    padding: 8px 20px;
    font-size: 0.9rem;
}

/* 联系我部分样式 */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #2c3e50;
}

.contact-info p {
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.contact-method {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.contact-method i {
    font-size: 1.5rem;
    color: #3498db;
    margin-right: 15px;
    width: 30px;
}

.social-links {
    display: flex;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.social-links a {
    display: inline-block;
    width: 50px;
    height: 50px;
    background-color: #3498db;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s;
    text-decoration: none;
    position: relative;
}

.social-links a:hover {
    background-color: #8e44ad;
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.social-links a[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #2c3e50;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 10;
}

.contact-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
    background-color: var(--card-bg);
    color: var(--text-color);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: #95a5a6;
    font-size: 0.95rem;
}

.contact-form textarea {
    height: 120px;
    resize: vertical;
    font-family: inherit;
}

.contact-form button {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 10px;
}

/* 页脚样式 */
footer {
    background: var(--footer-bg);
    color: var(--text-color);
    text-align: center;
    padding: 40px 0;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-text {
        padding-right: 0;
        margin-bottom: 50px;
    }
    
    .cta-buttons {
        justify-content: center;
    }
    
    .about-intro {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }
    
    .about-details {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .timeline-item {
        flex-direction: column;
        text-align: left;
    }
    
    .timeline-item::before {
        left: 15px;
    }
    
    .timeline-year {
        margin-bottom: 10px;
    }
    
    .timeline-content {
        padding-left: 40px;
    }
    
    .timeline-content::before {
        left: 9px;
    }
    
    .skills-content {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #fff;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }
    
    nav.active {
        display: block;
    }
    
    nav ul {
        flex-direction: column;
        padding: 20px;
    }
    
    nav ul li {
        margin: 10px 0;
    }
    
    .header-actions {
        gap: 0.5rem;
    }
    
    .theme-switcher {
        order: -1;
    }
    
    .theme-toggle {
        width: 36px;
        height: 36px;
        padding: 0.4rem;
        font-size: 0.9rem;
    }
    
    .language-switcher {
        order: 0;
    }
    
    .lang-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }

@media (max-width: 576px) {
        grid-template-columns: 1fr;
    }
    
    .profile-frame {
        width: 250px;
        height: 250px;
    }
}

@media (max-width: 576px) {
    .hero {
        padding: 60px 0;
    }
    
    .hero-text h2 {
        font-size: 2.2rem;
    }
    
    .hero-text .tagline {
        font-size: 1.2rem;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .about-intro {
        gap: 30px;
    }
    
    .profile-frame-large {
        width: 200px;
        height: 200px;
    }
    
    .about-summary h3 {
        font-size: 1.6rem;
    }
    
    .about-description {
        font-size: 1.1rem;
    }
    
    .timeline-section h3,
    .achievements-section h3 {
        font-size: 1.5rem;
    }
    
    .timeline {
        padding-left: 15px;
    }
    
    .timeline-item {
        padding-left: 10px;
    }
    
    .timeline-item::before {
        left: -21px;
        width: 12px;
        height: 12px;
    }
    
    .timeline-year {
        font-size: 1rem;
    }
    
    .timeline-content h4 {
        font-size: 1.1rem;
    }
    
    .achievement-card {
        padding: 20px;
    }
    
    .achievement-card i {
        font-size: 2rem;
    }
    
    .contact-form {
        padding: 0 20px;
    }
    
    .contact-form .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
}